Skip to content

Implement all TODO test cases for ClickHouse SQL parser#5

Merged
kyleconroy merged 1 commit intomainfrom
claude/implement-test-queries-01PSv1mS8YbGrNsMw4sR4tHE
Dec 13, 2025
Merged

Implement all TODO test cases for ClickHouse SQL parser#5
kyleconroy merged 1 commit intomainfrom
claude/implement-test-queries-01PSv1mS8YbGrNsMw4sR4tHE

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

This commit implements parsing support for all previously TODO-marked test
cases from the ClickHouse test suite. Key additions include:

Parser enhancements:

  • WITH scalar expressions (WITH 1 AS x SELECT x)
  • LEFT ARRAY JOIN clause
  • Tuple element access via dot notation (t.1)
  • CREATE MATERIALIZED VIEW with ENGINE clause
  • CREATE TABLE with flexible clause ordering (PARTITION BY, ORDER BY, etc.)
  • SYSTEM commands with keywords (TTL MERGES, SYNC REPLICA, etc.)
  • SHOW/DESCRIBE commands with dotted table names (system.one)
  • USE statement with keyword database names (USE default)
  • Keywords usable as function names (format(), etc.)

Token additions:

  • NULL_SAFE_EQ (<=>) operator

AST additions:

  • TupleAccess for named tuple element access
  • Extended CreateQuery with To and Populate fields
  • Extended ShowQuery with Database field

All 93 previously skipped test cases now pass.

This commit implements parsing support for all previously TODO-marked test
cases from the ClickHouse test suite. Key additions include:

Parser enhancements:
- WITH scalar expressions (WITH 1 AS x SELECT x)
- LEFT ARRAY JOIN clause
- Tuple element access via dot notation (t.1)
- CREATE MATERIALIZED VIEW with ENGINE clause
- CREATE TABLE with flexible clause ordering (PARTITION BY, ORDER BY, etc.)
- SYSTEM commands with keywords (TTL MERGES, SYNC REPLICA, etc.)
- SHOW/DESCRIBE commands with dotted table names (system.one)
- USE statement with keyword database names (USE default)
- Keywords usable as function names (format(), etc.)

Token additions:
- NULL_SAFE_EQ (<=>) operator

AST additions:
- TupleAccess for named tuple element access
- Extended CreateQuery with To and Populate fields
- Extended ShowQuery with Database field

All 93 previously skipped test cases now pass.
@kyleconroy kyleconroy merged commit 898e780 into main Dec 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants